﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Reflection;
using System.Linq;

namespace Inaction.Core
{
    public interface IProperty : INameObject
    {
        #region 属性
        int Index { get; }
        bool NeedUpdate { get; }
        bool Mapping { get; }
        object DefaultValue { get; }
        Inaction.DbSchame.Column Column { get; }
        PropertyInfo PropertyInfo { get; }
        Type UnderlyingType { get; }
        bool IsKeyWordProperty { get; }
        bool IsCreaterProperty { get; }
        bool IsCreateTimeProperty { get; }
        bool IsUpdateTimeProperty { get; }
        bool IsUpdaterProperty { get; }
        bool IsDeletedProperty { get; }
        List<ValidationAttribute> ValidateAttributes { get; }
        RequiredAttribute Required { get; }
        #endregion

        #region 方法
        object GetFieldValue(ModelBase t);
        void SetFieldValue(ModelBase t, object value);
        #endregion
    }
}